import React from 'react';

import CommonSendFetchAction from '../common/CommonSendFetchAction';
import Constants from '../../common/Constants';

export default class PostRequestContentAction extends CommonSendFetchAction {
    constructor() {
        super();

        this.moduleType = Constants.MODULE_TYPE.POST;
        this.name = "PostRequestContentAction";
    }

    _dealFinishSucess(data, response) {
      let detail = "";
      if(data && data.detail != undefined) {
        detail = data.detail;
      }
      this.caller.setState({
        viewStatus:response.status,
        isResponeUpdate:true,
        statusText:detail,
        is_follow:data.is_follow,
        data:data.links.post,
        is_favorited:data.is_favorited,
        is_liked:data.is_liked,
      })
    }
}
